package com.xinyi;
/**
 * @desc:
 * @author: Shoko
 * @date: 2025/3/16
 */
public class LogTest {
    private final static String PROPERTY_KEY = "log.factory.class";
    public static void test() throws Exception{
        //从配置文件中获取工厂类型
        LogFactory logFactory = (LogFactory) TestUtil.getClassFromProperties(PROPERTY_KEY).newInstance();
        //从日志工厂中得到日志并操作
        logFactory.produceLog().write();
    }

    public static void main(String[] args) {
        try{
            test();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
